﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using PPI.Entities.Inspections;
using VMind.Global;

namespace PPI.Client.Logic.Inspection
{
    public class LInspectionType
    {
        public static List<EInspectionTypes> SelectAllIdName()
        {
            List<EInspectionTypes> listInspectionTypes = new List<EInspectionTypes>();

            DataTable dt = WebConsumer.Inspection.WInspectionType.SelectAllIdName().Tables[0];

            foreach (DataRow dr in dt.Rows)
            {
                EInspectionTypes resultType = new EInspectionTypes(ConvertHelper.ToInt32(dr["Vendor_InspVisit_XmissionStructures_Inspection_TypeId"]), dr["Name"].ToString());
                listInspectionTypes.Add(resultType);

            }
            return listInspectionTypes;
        }
    }
}
